package com.yss.sofa.report.engine.cell.visible.result;

import java.util.Map;

import com.yss.sofa.report.engine.Const;
import com.yss.sofa.report.engine.cell.ReportCell;
import com.yss.sofa.report.engine.cell.visible.form.FormCell;

public class FormResultCell extends ResultCell {
	private static final long serialVersionUID = -8017310831414827839L;
	private FormCell form;
	protected void init() {
		super.init();
	}
	public void assignTo(ReportCell cell){
		FormResultCell _=(FormResultCell)cell;
		super.assignTo(_);
		_.form=this.form.create();
	}
	public FormResultCell create(){
		FormResultCell _=new FormResultCell();
		this.assignTo(_);
		return _;
	}
	private FormResultCell(){
		super();
		this.form=null;
	}
	public FormResultCell(FormCell from){//不是拼写错误，就是from
		this();
		this.form=from;
		this.rfrom=from.getRfrom();
		this.cfrom=from.getCfrom();
		this.top=from.getTop();
		this.left=from.getLeft();
		this.dataType=Const.CELL_DATA_TYPE_FORM;
		//this.autoMerge=false;
		this.move=Const.CELL_MOVE_ABS;
		this.rbegin=0;
		this.rend=from.getRend()-from.getRbegin();
		this.cbegin=0;
		this.cend=from.getCend()-from.getCbegin();
		this.fromRbegin=from.getRbegin();
		this.fromRend=from.getRend();
		this.fromCbegin=from.getCbegin();
		this.fromCend=from.getCend();
		this.style="";
		this.mergeTimes=1;
		this.forceMerge="";
		this.forceMergeTo=ForceMergeTo.FORCE_MERGE_TO_N;
		this.html="";
	}
	public String getValue() {
		return null;
	}
	public Map<String,String> getRecord(){
		return null;
	}
	public Map<String,String> getAttr(){
		throw null;
	}
	public FormCell getForm() {
		return form;
	}
	public boolean isForceMerge() {
		return false;
	}
	public ForceMergeTo getForceMergeTo() {
		return ForceMergeTo.FORCE_MERGE_TO_N;
	}
}
